<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Ad_model extends MY_Model
{
    public function __construct() {
        parent::__construct();
    }
	/**
	 * 获取列表
	 *
	 * return array
	 */
	public function getAdList()
	{
    	$sql = "SELECT id,imgurl,remark FROM yy_advertisement  WHERE isDel=0 AND onlinestatus = 1 ORDER BY addtime";
        $query = $this->db->query($sql);

		return $query->result_array();
	}


	public function getItemAdList($filds = " * ")
	{
    	$sql = "SELECT {$filds} FROM yy_item_advertisement  WHERE isDel=0 AND onlinestatus = 1 ORDER BY addtime";
        $query = $this->db->query($sql);

		return $query->result_array();
	}

}

